package com.zzty.txj.dao;


import com.zzty.txj.entity.Question;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface QuestionMapper {

    @Insert("insert into question(content) values(#{content})")
    public int add(Question question);
   @Select("select IFNULL(MAX(id),0 ) as id from question")
    public int getId();
   @Select("select * from question where id=#{id}")
    public Question getContent(int id);
   @Select("select * from question")
    public List<Question> getQuestions();


}
